package com.duqc.web.service.impl;

import cn.dev33.satoken.fun.SaParamRetFunction;
import com.duqc.util.TreeNode;
import com.duqc.web.dao.TreeNodeMapper;
import com.duqc.web.entity.TreeNodeEntity;
import com.duqc.web.service.TreeNodeService;
import io.lettuce.core.output.KeyValueStreamingChannel;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName TreeNodeServiceImpl
 * @Description TreeNodeServiceImpl
 * @Author duqc
 * @Date 2023/4/26
 **/
@Service
@RequiredArgsConstructor
public class TreeNodeServiceImpl implements TreeNodeService {

    private final TreeNodeMapper treeNodeMapper;

    @Override
    public List<TreeNodeEntity> data() {
        List<TreeNodeEntity> list = this.treeNodeMapper.data();
        return TreeNode.build(list, TreeNodeEntity::getId, TreeNodeEntity::getPid, TreeNodeEntity::setChildren,"22","21");
    }
}
